#pragma once

#include "cocos2d.h"
#include <memory>
#include <string>
#include "cocos_util/common_types.h"

class MainScene : public cocos2d::Layer {
public:
    MainScene() : _root(nullptr), _particle(nullptr) { }

    static cocos2d::Scene* createScene();

    virtual bool init();

    void menuCloseCallback(cocos2d::Ref* pSender);

    // implement the "static create()" method manually
    CREATE_FUNC(MainScene);

    void moveParticle();
    void moveCircles();
private:
    elloop::LayoutPtr       _root;
    elloop::LayoutPtr       _particle;
    cocos2d::Vec2           _centerPos;
    cocos2d::Vec2           _minPos;
    cocos2d::Vec2           _secPos;
    static const std::string MINUTE_NODE;
    static const std::string SECOND_NODE;
};
